package createpattern.prototype;

/**
 * @author seer
 * @date 2018/2/7 11:57
 */
public class PrototypePatternDemo {
    public static void main(String[] args) throws CloneNotSupportedException {
        ShapeCache.loadShape();

        Square square1 = (Square) ShapeCache.getShape(Square.class);
        Square square2 = (Square) ShapeCache.getShape(Square.class);
        System.out.println(square1);
        System.err.println(square2);

        System.out.println(square1 == square2);
    }


}
